<script setup lang="ts">
import myTitle from "@/components/myTitle/myTitle.vue";
import keList from "@/components/mzh-collect/keList.vue";
import jiList from "@/components/mzh-collect/jiList.vue";
const title = ref("收藏");
const tab = ref<number>(0);
const navData = ["科普", "疾病"];
const ListData = ref([
  {
    id: 1,
    title: "夏天不能光脚丫、不能吃冰激凌？别用养生折腾孩子了",
    name: "王医生",
    yiyuan: "积水潭医院",
    src: "/src/static/header-img/9.png",
    img: "/src/static/doctor/15.jpg",
  },
  {
    id: 2,
    title: "夏天不能光脚丫、不能吃冰激凌？别用养生折腾孩子了",
    name: "王医生",
    yiyuan: "积水潭医院",
    src: "/src/static/header-img/9.png",
    img: "/src/static/doctor/15.jpg",
  },
  {
    id: 3,
    title: "夏天不能光脚丫、不能吃冰激凌？别用养生折腾孩子了",
    name: "王医生",
    yiyuan: "积水潭医院",
    src: "/src/static/header-img/9.png",
    img: "/src/static/doctor/15.jpg",
  },
  {
    id: 4,
    title: "夏天不能光脚丫、不能吃冰激凌？别用养生折腾孩子了",
    name: "王医生",
    yiyuan: "积水潭医院",
    src: "/src/static/header-img/9.png",
    img: "/src/static/doctor/15.jpg",
  },
  {
    id: 5,
    title: "夏天不能光脚丫、不能吃冰激凌？别用养生折腾孩子了",
    name: "王医生",
    yiyuan: "积水潭医院",
    src: "/src/static/header-img/9.png",
    img: "/src/static/doctor/15.jpg",
  },
]);
</script>

<template>
  <div class="" style="height: 100vh; background-color: #fff">
    <view>
      <myTitle :title="title" :ifText="true" />
    </view>
    <view>
      <wd-tabs v-model="tab" swipeable>
        <block v-for="(item, index) in navData" :key="item">
          <wd-tab class="border-b-1rpx border-b-solid border-b-[#eeedf5]" :title="item">
            <scroll-view scroll-y>
              <keList v-if="index == 0" :ListData="ListData" />
              <jiList v-else />
            </scroll-view>
          </wd-tab>
        </block>
      </wd-tabs>
    </view>
  </div>
</template>

<style lang="scss" scoped>
:deep() {
  .wd-tabs__line[data-v-c72f40b5] {
    top: 80rpx;
    background-color: #29c6aa;
  }
}
</style>
